package com.wangxiang.sys.manage.controller;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


import com.wangxiang.common.utils.PageEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.wangxiang.sys.manage.entity.LoginLogGatewayEntity;
import com.wangxiang.sys.manage.service.LoginLogGatewayService;
import com.wangxiang.common.utils.PageUtils;
import com.wangxiang.common.utils.R;



/**
 * 
 *
 * @author wangxiang
 * @email 2293672863@qq.com
 * @date 2022-05-11 20:57:36
 */
@RestController
@RequestMapping("sys/login/log/gateway")
public class LoginLogGatewayController {
    @Autowired
    private LoginLogGatewayService loginLogGatewayService;

    @RequestMapping("page")
    public R page(@RequestBody HashMap<String,Integer> map){
        PageEntity page = loginLogGatewayService.page(map);
//        System.out.println("page"+page);
        List<HashMap<String, Object>> hashMaps = loginLogGatewayService.pageMap((List<LoginLogGatewayEntity>) page.getList());
        return R.ok().put("list",hashMaps).put("total",page.getTotalCount());
    }


}
